package StructuralPattern.AdapterPattern;

//import StructuralModel.AdapterPattern.ClassAdapterPattern.MediaAdapter;
//import StructuralModel.AdapterPattern.ClassAdapterPattern.adapter.MediaPlayer;

//import StructuralModel.AdapterPattern.ObjectAdapterPattern.adapter.MediaAdapter;
//import StructuralModel.AdapterPattern.ObjectAdapterPattern.interfase.MediaPlayer;

import StructuralPattern.AdapterPattern.InterfaceAdapterPattern.adapter.Mp4PlayerAdapter;
import StructuralPattern.AdapterPattern.InterfaceAdapterPattern.adapter.VlcPlayerAdapter;
import StructuralPattern.AdapterPattern.InterfaceAdapterPattern.Interfase.MediaPlayer;
//适配器模式
public class TestAdapter {
    public static void main(String[] args) {
//        //类适配器模式
//        MediaPlayer mediaPlayer = new MediaAdapter();
//        mediaPlayer.play("mp4", "movie.mp4");
//        mediaPlayer.play("vlc", "documentary.vlc");

//        //对象适配器模式
//        MediaPlayer mediaPlayer = new MediaAdapter("mp4");
//        mediaPlayer.play("mp4", "movie.mp4");
//
//        mediaPlayer = new MediaAdapter("vlc");
//        mediaPlayer.play("vlc", "documentary.vlc");

        //接口适配器
        MediaPlayer mp4Player = new Mp4PlayerAdapter();
        mp4Player.playMp4("movie.mp4");

        MediaPlayer vlcPlayer = new VlcPlayerAdapter();
        vlcPlayer.playVlc("documentary.vlc");
    }
}
